import Cookies from 'js-cookie'

const TokenKey = 'vue3-hrss-token' // 设置一个独一无二 cookie的 key
export function getToken () { // 获取token
  return Cookies.get(TokenKey)
}

export function setToken (token) { // 设置token
  return Cookies.set(TokenKey, token)
}

export function removeToken () { // 删除token
  return Cookies.remove(TokenKey)
}

export function getNmae (name) { // 存储用户的账号和密码
  return Cookies.get(name)
}

export function setPassword (key, value) { // 获取用户存储的账号和密码
  return Cookies.set(key, value)
}
